

try:
    with open(file='data.txt',mode='r',encoding='utf-8') as f:
        print('文件操作')
        #会自动关闭
except Exception as e:
    print(e)
finally:
    print('结束')
